﻿// -----------------------------------------------------------------------
// <copyright file="FailedPushResult.cs" company="Zen Design Corp">
// TODO: Update copyright text.
// </copyright>
// -----------------------------------------------------------------------

namespace Zen.BlackBerry.Push
{
	using System;
	using System.Collections.Generic;
	using System.Linq;
	using System.Text;
	using Zen.BlackBerry.Common;

	/// <summary>
	/// The result of an attempt to push to a subscriber that failed due to an
	/// error on the PPG end. (e.g. the PPG could not be contacted, a duplicate
	/// push ID was found, etc.).
	/// </summary>
	/// <remarks>
	/// IMPORTANT NOTE: This class does NOT represent results for subscribers
	/// that the PPG has attempted to deliver to, but were unsuccessful.
	/// For a push application with a service level of Push Plus, use result
	/// notification to determine the final outcome of a push to a subscriber.
	/// Or, use the status query methods, if not using result notification /
	/// acknowledgements.
	/// The final outcome of a push to a subscriber cannot be determined for a
	/// push application with a service level of Push Essentials.
	/// </remarks>
	public class FailedPushResult
	{
		/// <summary>
		/// Initializes a new instance of the <see cref="FailedPushResult"/> class.
		/// </summary>
		/// <param name="subscriberId">The subscriber id.</param>
		/// <param name="code">The code.</param>
		/// <param name="description">The description.</param>
		public FailedPushResult(
			string subscriberId, StatusCode code, string description)
		{
			SubscriberId = subscriberId;
			Code = code;
			Description = description;
		}

		/// <summary>
		/// Gets the subscriber id.
		/// </summary>
		/// <value>The subscriber id.</value>
		public string SubscriberId
		{
			get;
			private set;
		}

		/// <summary>
		/// Gets the code.
		/// </summary>
		/// <value>The code.</value>
		public StatusCode Code
		{
			get;
			private set;
		}

		/// <summary>
		/// Gets the description.
		/// </summary>
		/// <value>The description.</value>
		public string Description
		{
			get;
			private set;
		}
	}
}
